package com.example.administrator.ci_test;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;

import java.util.Properties;


public class MainActivity extends Activity {

    private TextView tip ;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        tip = (TextView)findViewById(R.id.tip);
        tip.setText(getPropertiesURL(this,"tip"));
    }

    public static String getPropertiesURL(Context c, String s) {
        String url = null;
        Properties properties = new Properties();
        try {
            properties.load(c.getAssets().open("property.properties"));
            url = properties.getProperty(s);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return url;
    }
}
